import {DECREMENT, INCREMENT} from './constant'

export const createIncrementAction = (data) => {
    return {
        type: INCREMENT,
        data: data
    }
}

export const createDecrementAction = (data) => {
    return {
        type: DECREMENT,
        data: data
    }
}

export const createIncrementAsyncAction = (data, time) => {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(createIncrementAction(data))
        }, time)
    }
}